wayland/surface: Destroy toplevel present callback if ignored
authorJonas Ådahl <jadahl@gmail.com>
Fri, 7 Aug 2020 07:03:03 +0000 (09:03 +0200)
committerJonas Ådahl <jadahl@gmail.com>
Fri, 7 Aug 2020 07:06:21 +0000 (09:06 +0200)
commitc27f811462c59617842da3b3a0edefbc97500400
tree64a6502075e83ee3dc9d60452e99f2240099389e
parent3590923c8b792320f30e3da7061108ebb4980d59
wayland/surface: Destroy toplevel present callback if ignored

We might break the loop early, e.g. if we're unmapped before the round
trip finishes, and to avoid the callback to write to invalid stack
memory, destroy the callback so it won't be invoked.

Fixes: #3026
gdk/wayland/gdksurface-wayland.c